﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:assets="clr-namespace:DeepForest.Phone.Assets.Shell;assembly=DeepForest.Phone.Assets"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:local="clr-namespace:Tanis.Settings" 
    x:Class="Tanis.Settings.SettingsPage" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot Title="{Binding LocalizedResources.AppTitleForStaticPages, Source={StaticResource LocalizedStrings}}">
            <!--Pivot item one-->
            <controls:PivotItem Header="{Binding LocalizedResources.PageTitleSettings, Source={StaticResource LocalizedStrings}}">
                <local:SettingsControl x:Name="_settingsControl"/>
            </controls:PivotItem>

            <!--Pivot item two-->
            <controls:PivotItem Header="{Binding LocalizedResources.PageTitleAbout, Source={StaticResource LocalizedStrings}}">
                <Grid Margin="12,0,12,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="40"/>
                        <RowDefinition Height="80"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" HorizontalAlignment="Center"  VerticalAlignment="Top" Source="/Images/bus-image-med.png" />
                    <TextBlock Grid.Row="0" Grid.Column="1"
                                   Text="{Binding LocalizedResources.AboutPageCaption, Source={StaticResource LocalizedStrings}}"
                                   FontSize="{StaticResource PhoneFontSizeLarge}"
                                   FontFamily="{StaticResource PhoneFontFamilySemiBold}"/>
                    <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding LocalizedResources.AboutPageApplicationVersion, Source={StaticResource LocalizedStrings}}" />
                    <TextBlock Grid.Row="2" Grid.ColumnSpan="2" Text="{Binding LocalizedResources.AboutPageApplicationDescription, Source={StaticResource LocalizedStrings}}" TextWrapping="Wrap" Padding="0,0,0,16"/>
                    <TextBlock Grid.Row="3" Grid.Column="0" Text="{Binding LocalizedResources.AboutPageRoutingDataProvided, Source={StaticResource LocalizedStrings}}"/>
                    <HyperlinkButton Grid.Row="3" Grid.Column="1" Content="www.marsrutai.lt" NavigateUri="http://www.marsrutai.lt" VerticalAlignment="Top" TargetName="_blank" HorizontalAlignment="Left" />
                    <TextBlock Grid.Row="4" Grid.Column="0" Text="{Binding LocalizedResources.AboutPageSponsoredLabel, Source={StaticResource LocalizedStrings}}" Padding="0,16,0,0"/>
                    <HyperlinkButton Grid.Row="4" Grid.Column="1" Content="1ClickFactory" NavigateUri="http://www.1clickfactory.com" VerticalAlignment="Top" TargetName="_blank" HorizontalAlignment="Left" Padding="0,16,0,0"/>
                    <TextBlock Grid.Row="5" Grid.ColumnSpan="2" Text="{Binding LocalizedResources.AboutPageProjectInfo, Source={StaticResource LocalizedStrings}}" TextWrapping="Wrap" Padding="0,16,0,0"/>
                    <HyperlinkButton Grid.Row="6" Grid.ColumnSpan="2" Content="ridelithuania.codeplex.com" NavigateUri="https://ridelithuania.codeplex.com/" TargetName="_blank" HorizontalAlignment="Left" VerticalAlignment="Top" />                    
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <!-- Application button / menu bar -->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="False">
            <shell:ApplicationBarIconButton x:Name="DoneButton" IconUri="/Images/appbar.check.rest.png" Text="Done" Click="DoneButton_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>